package com.jzl.swing.service;

import java.sql.SQLException;
import java.util.List;

import com.jzl.swing.entity.Bill;

public interface BillService {
	/**
	 * 插入数据进入账单
	 * @param bill
	 * @return
	 * @throws SQLException
	 */
	public abstract boolean insertBill(Bill bill)throws SQLException;
	/**
	 * 修改账单
	 * @param bill
	 * @return
	 * @throws SQLException
	 */
	public abstract boolean modifyBill(Bill bill)throws SQLException;
	/**
	 * 查询所有账单
	 * @return
	 * @throws SQLException
	 */
	public abstract List<Bill> queryAll()throws SQLException;
	/**
	 * 根据商品名称和付款情况组合查询
	 * @param name
	 * @param isPaid
	 * @return
	 * @throws SQLException
	 */
	public abstract List<Bill> queryByNameAndPaid(String name, String isPaid)throws SQLException;

	/**
	 * 通过number主键查询数据
	 * @param number
	 * @return
	 * @throws SQLException
	 */
	public abstract Bill queryByNumber(String number)throws SQLException;
	
	/**
	 * 删除数据
	 * @param number
	 * @return
	 * @throws SQLException
	 */
	public abstract int deleteByNumber(String number)throws SQLException;
	
}
